import { ElMessage } from 'element-plus'

export function copys(str) {
    window.navigator.clipboard.writeText(str)
}

export function copy(str) {
    try {
        copys(str)
        ElMessage.success('已复制到剪切板')
    } catch (error) {
        ElMessage.info("复制失败")
    }
}